﻿using System;
using System.Collections.Generic;
using System.Text;

namespace KingOfCSharp.iHunter.UI
{
    public class HtmlViewerProvider: IViewerProvider
    {
        public static readonly Guid Guid = new Guid("51B8ED04-7994-4321-AA9C-3699AD61C4F1");

        #region IViewerProvider 成员

        public IMessageViewer CreateViewerInstance()
        {
            return new KingOfCSharp.iHunter.UI.HtmlMessageViewer();
        }

        #endregion


        #region IPlugin 成员

        Guid IPlugin.Guid
        {
            get { return HtmlViewerProvider.Guid; }
        }

        void IPlugin.Initialize(IPluginClient client)
        {
            
        }

        System.Windows.Forms.UserControl IPlugin.GetPluginConfigureEditor()
        {
            return null;
        }

        event PluginErrorEventHandler IPlugin.ErrorOccur
        {
            add { throw new InvalidOperationException(); }
            remove { throw new InvalidOperationException(); }
        }

        #endregion

        #region IDisposable 成员

        void IDisposable.Dispose()
        {
        }

        #endregion

        #region IPlugin 成员


        public string Name
        {
            get { return "HTML Viewer"; }
        }

        public string Description
        {
            get { return string.Empty ; }
        }

        #endregion
    }
    
    public class HtmlEditorProvider : IEditorProvider
    {
        public static readonly Guid Guid = new Guid("FDF071D0-C02C-4c04-969A-296F915F3400");



        #region IPlugin 成员

        Guid IPlugin.Guid
        {
            get { return HtmlEditorProvider.Guid; }
        }

        void IPlugin.Initialize(IPluginClient client)
        {

        }

        System.Windows.Forms.UserControl IPlugin.GetPluginConfigureEditor()
        {
            return null;
        }

        event PluginErrorEventHandler IPlugin.ErrorOccur
        {
            add { throw new InvalidOperationException(); }
            remove { throw new InvalidOperationException(); }
        }

        #endregion

        #region IDisposable 成员

        void IDisposable.Dispose()
        {
        }

        #endregion

        #region IEditorProvider 成员

        public IMessageEditor CreateEditorInstance()
        {
            return new KingOfCSharp.iHunter.UI.HtmlMessageEditor();
        }


        #endregion

        #region IPlugin 成员


        public string Name
        {
            get { return "Standard HTML Message"; }
        }

        public string Description
        {
            get { return string.Empty; }
        }
        #endregion
    }
}
